Component({

    properties: {
        title: String,
        first: Boolean,
        latest: Boolean
    },

    data: {
        leftImg: "./images/triangle@left.png",
        leftDisImg: './images/triangle.dis@left.png',
        rightImg: "./images/triangle@right.png",
        rightDisImg: './images/triangle.dis@right.png'
    },

    methods: {
        // 切换下一期刊 如果是最新一期 禁止
        onTableft() {
            const latest = this.properties.latest
            if (latest) {
                return
            }
            this.triggerEvent('next')
        },

        // 切换上一期刊 如果是第一期 禁止
        onTabRight() {
            const first = this.properties.first
            if (first) {
                return
            }
            this.triggerEvent('previous')
        }
    }
})